Use ORCID API v3 in Lookup model #2774
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates the ORCID URLs set in the AppModel to v3, introduced in 2019. It was previously using a deprecated version (v1?) which no longer returned results from ORCID.
The
orcidSearchmethod inLookupModelis the only place where theorcidSearchUrlis actively used. This method is used on the User Profile View where a user searches for members to add to a group. In addition to adaptingorcidSearchto use ORCID v3, I also modernized the method to conform to our new style/linting rules and to use native JS methods (e.g.fetch) in place of jQuery (e.g.$.get). I added a unit test for theorcidSearchmethod.One other Lookup model method,
orcidGetConcepts, relied on the older ORCID API, but was no longer used anywhere in MetacatUI, and was therefore deprecated.